<div class="dialog-wrap">
    <form class="layui-form smart-form">
        <div class="layui-form-item">
            <input type="checkbox" name="" title="状态" lay-skin="primary">
        </div>
        <div class="layui-form-item">
            <input type="checkbox" name="" title="学校" lay-skin="primary">
        </div>
        <div class="layui-form-item">
            <input type="checkbox" name="" title="所有公司" lay-skin="primary">
        </div>
        <div class="layui-form-item">
            <input type="checkbox" name="" title="职位" lay-skin="primary">
        </div>
        <div class="layui-form-item">
            <input type="checkbox" name="" title="意向城市" lay-skin="primary">
        </div>
        <div class="layui-form-item">
            <input type="checkbox" name="" title="行业" lay-skin="primary">
        </div>
        <div class="layui-form-item">
            <input type="checkbox" name="" title="过往公司" lay-skin="primary">
        </div>
        <div class="layui-form-item">
            <input type="checkbox" name="" title="添加人" lay-skin="primary">
        </div>
        <div class="layui-form-item">
            <input type="checkbox" name="" title="录入方式" lay-skin="primary">
        </div>
        <div class="layui-form-item">
            <input type="checkbox" name="" title="最近公司" lay-skin="primary">
        </div>
        <div class="layui-form-item">
            <input type="checkbox" name="" title="拥有者" lay-skin="primary">
        </div>
        <div class="layui-form-item">
            <input type="checkbox" name="" title="职能" lay-skin="primary">
        </div>
        <div class="layui-form-item">
            <input type="checkbox" name="" title="所在城市" lay-skin="primary">
        </div>
        <div class="layui-form-item">
            <input type="checkbox" name="" title="渠道" lay-skin="primary">
        </div>
        <div class="layui-form-item layui-hide">
            <div class="layui-input-block">
                <button class="layui-btn layui-btn-normal layui-hide" id="saveBtn" lay-submit lay-filter="saveBtn">确认保存</button>
            </div>
        </div>
    </form>
</div>
<script>
    layui.use(['layer', 'form', 'miniPage', 'element', 'utils'], function () {
        var $ = layui.jquery,
            layer = layui.layer,
            form = layui.form,
            miniPage = layui.miniPage,
            element = layui.element,
            utils = layui.utils;
        /**
         * 初始化表单，要加上，不然刷新部分组件可能会不加载
         */
        form.render();

        // 当前弹出层，防止ID被覆盖
        var parentIndex = layer.index;

        //监听提交
        form.on('submit(saveBtn)', function (data) {
            utils.Ajax({
                url: 'api/talent.json',
                dataType: 'json',
                type: 'post',
                data: data.field,
                success: function (response) {
                    layer.msg(response.message, {time: 1000}, function () {
                        thatSmartMenu.getMenuInfo();
                        layer.close(parentIndex);
                    })
                }
            });

            return false;
        });

    });

</script>